﻿<UserControl x:Class="Dotway.WPF.Samples.DotwaySampleApplication.ZipperPanelSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:panels="clr-namespace:Dotway.WPF.Panels;assembly=Dotway.WPF.Panels">
    <Grid Margin="20">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <StackPanel Grid.Column="0" Width="200">
            <RepeatButton Content="Add item" Click="AddButtonClick"/>
            <RepeatButton Content="Remove item" Click="RemoveButtonClick"/>
            <StackPanel>
                <TextBlock Text="Children per row" />
                <TextBlock Text="{Binding ElementName=zipperPanel, Path=ChildrenPerRow}" />
                <Slider Value="{Binding ElementName=zipperPanel, Path=ChildrenPerRow}" Minimum="1" Maximum="20" />
            </StackPanel>
            <StackPanel>
                <TextBlock Text="Spacing X" />
                <TextBlock Text="{Binding ElementName=zipperPanel, Path=SpacingX}" />
                <Slider Value="{Binding ElementName=zipperPanel, Path=SpacingX}" Minimum="0" Maximum="200" />
            </StackPanel>
            <StackPanel>
                <TextBlock Text="Spacing Y" />
                <TextBlock Text="{Binding ElementName=zipperPanel, Path=SpacingY}" />
                <Slider Value="{Binding ElementName=zipperPanel, Path=SpacingY}" Minimum="0" Maximum="200" />
            </StackPanel>
            <StackPanel>
                <TextBlock Text="Row Offset" />
                <TextBlock Text="{Binding ElementName=zipperPanel, Path=RowOffset}" />
                <Slider Value="{Binding ElementName=zipperPanel, Path=RowOffset}" Minimum="0" Maximum="200" />
            </StackPanel>
            <StackPanel>
                <TextBlock Text="Column Offset" />
                <TextBlock Text="{Binding ElementName=zipperPanel, Path=ColumnOffset}" />
                <Slider Value="{Binding ElementName=zipperPanel, Path=ColumnOffset}" Minimum="0" Maximum="200" />
            </StackPanel>            
            <StackPanel>
                <TextBlock Text="Top" />
                <TextBlock Text="{Binding ElementName=zipperPanel, Path=Top}" />
                <Slider Value="{Binding ElementName=zipperPanel, Path=Top}" Minimum="0" Maximum="200" />
            </StackPanel>
            <StackPanel>
                <TextBlock Text="Left" />
                <TextBlock Text="{Binding ElementName=zipperPanel, Path=Left}" />
                <Slider Value="{Binding ElementName=zipperPanel, Path=Left}" Minimum="0" Maximum="200" />
            </StackPanel>
        </StackPanel>

        <ScrollViewer Grid.Column="1">
            <panels:ZipperPanel x:Name="zipperPanel"/>
        </ScrollViewer>
    </Grid>
</UserControl>
